﻿<%@ Page Title="Cadastro de Projetos" Language="C#" MasterPageFile="~/Site.Master"
    AutoEventWireup="true" CodeBehind="CadastroProjeto.aspx.cs" Inherits="GerTestes.Cadastros.CadastroProjeto" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">
        .style2
        {
            width: 100%;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:Panel ID="pnlConsulta" runat="server">
        <div class="row">
            <div class="col-lg-12">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <h2>
                            <br />
                            <i class="fa fa-align-justify"></i><span class="break">Consulta Projetos</h2>
                        <div class="panel-actions">
                            <a href="table.html#" class="btn-minimize"><i class="fa fa-chevron-up"></i></a>
                        </div>
                        <div class="panel-actions">
                            <div style="margin-right: 20px; margin-top: 2.5px;">
                                <asp:TextBox ID="TxtPesquisaGrid" ClientIDMode="Static" CssClass="pesquisa" Width="250px"
                                    placeholder="Localizar..." runat="server" AutoPostBack="True" OnTextChanged="TxtPesquisa_TextChanged"
                                    MaxLength="50"></asp:TextBox>
                            </div>
                        </div>
                    </div>
                    <div class="panel-body">
                        <asp:GridView ID="gvwProjetos" ClientIDMode="Static" runat="server" CssClass="table table-bordered table-striped table-condensed gridDinamica"
                            EmptyDataText="Registros não localizados..." AutoGenerateColumns="False" Width="100%"
                            role="grid" aria-describedby="DataTables_Table_0_info" OnRowCreated="gvwProjetos_RowCreated"
                            OnRowDataBound="gvwProjetos_RowDataBound" GridLines="None" DataKeyNames="ID_PROJETO"
                            OnRowCommand="gvwProjetos_RowCommand" PageSize="100">
                            <Columns>
                                <asp:TemplateField HeaderText="Editar" ShowHeader="False">
                                    <ItemTemplate>
                                        <abbr title="Editar usuário!">
                                            <asp:ImageButton ID="ImgAlterar" runat="server" CausesValidation="false" CommandName="Alterar"
                                                ImageUrl="~/assets/img/edit.png" Text="Alterar" Width="25px" />
                                        </abbr>
                                    </ItemTemplate>
                                    <HeaderStyle HorizontalAlign="Center" Width="1%" />
                                    <ItemStyle HorizontalAlign="Center" Width="1%" />
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Excluir" ShowHeader="False">
                                    <ItemTemplate>
                                        <abbr title="Excluir usuário!">
                                            <asp:ImageButton ID="ImgExcluir" runat="server" CausesValidation="false" CommandName="Excluir"
                                                ImageUrl="~/assets/img/delete.png" OnClientClick="return ShowConfirm('Tem certeza que deseja excluir?', this.ID);"
                                                Text="Excluir" Width="25px" />
                                        </abbr>
                                    </ItemTemplate>
                                    <HeaderStyle HorizontalAlign="Center" Width="1%" />
                                    <ItemStyle HorizontalAlign="Center" Width="1%" />
                                </asp:TemplateField>
                                <asp:BoundField DataField="DESCRICAO" HeaderText="Projeto">
                                    <ItemStyle HorizontalAlign="Left" Width="40%" />
                                </asp:BoundField>
                                <asp:BoundField DataField="GERENTE" HeaderText="Gerente">
                                    <ItemStyle HorizontalAlign="Left" Width="20%" />
                                </asp:BoundField>
                                <asp:BoundField DataField="ANALISTA" HeaderText="Analista de Teste">
                                    <ItemStyle HorizontalAlign="Left" Width="20%" />
                                </asp:BoundField>
                                <asp:BoundField DataField="LIDER_TESTE" HeaderText="Líder de Teste">
                                    <ItemStyle HorizontalAlign="Left" Width="20%" />
                                </asp:BoundField>
                                <asp:TemplateField HeaderText="Situação">
                                    <ItemTemplate>
                                        <asp:Image ID="imgStatus" runat="server" Height="25px" Width="25px" />
                                    </ItemTemplate>
                                    <ItemStyle HorizontalAlign="Center" />
                                </asp:TemplateField>
                                <asp:BoundField DataField="ATIVO" HeaderText="Status">
                                    <ItemStyle HorizontalAlign="Center" Width="2%" />
                                </asp:BoundField>
                            </Columns>
                            <PagerStyle CssClass="pagination" Wrap="True" />
                        </asp:GridView>
                        <asp:Button ID="btnIncluir" formnovalidate="formnovalidate" runat="server" Text="Incluir"
                            OnClick="btnIncluir_Click" />
                    </div>
                </div>
            </div>
        </div>
        </span>
    </asp:Panel>
    <br />
    <asp:Panel ID="pnlEdicao" runat="server" Visible="False">
        <div class="row">
            <div class="col-lg-12">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <h2>
                            <br />
                            <i class="fa fa-align-justify"></i><span class="break">
                                <asp:Label ID="lblDescricaoPnlEdicao" runat="server" Text="Inclusão de Projeto"></asp:Label></h2>
                        <div class="panel-actions">
                            <a href="table.html#" class="btn-minimize"><i class="fa fa-chevron-up"></i></a>
                        </div>
                    </div>
                    <div class="panel-body">
                        <div>
                            <table class="style2">
                                <tr>
                                    <td>
                                        <asp:Label ID="Label1" runat="server" Text="Descrição Projeto"></asp:Label>
                                        <br />
                                        <asp:TextBox ID="TxtDescricao" required MaxLength="150" runat="server" Width="400px"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <asp:Label ID="Label2" runat="server" Text="Gerente"></asp:Label>
                                        <br />
                                        <asp:DropDownList ID="ddlGerente" runat="server" Width="250px">
                                        </asp:DropDownList>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <asp:Label ID="Label3" runat="server" Text="Analista"></asp:Label>
                                        <br />
                                        <asp:DropDownList ID="ddlAnalista" runat="server" Width="250px">
                                        </asp:DropDownList>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <asp:Label ID="Label4" runat="server" Text="Líder de Teste"></asp:Label>
                                        <br />
                                        <asp:DropDownList ID="ddlLiderTeste" runat="server" Width="250px">
                                        </asp:DropDownList>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <asp:CheckBox ID="CheckAtivo" runat="server" Text="Ativo?" />
                                    </td>
                                </tr>
                            </table>
                            <br />
                            <asp:Button ID="btnConfirmar" runat="server" Text="Confirmar" OnClick="btnConfirmar_Click" />
                            <asp:Button ID="btnCancelar" formnovalidate="formnovalidate" runat="server" Text="Cancelar"
                                OnClick="btnCancelar_Click" />
                        </div>
                    </div>
                </div>
            </div>
        </span>
    </asp:Panel>
</asp:Content>
